Skip to main content

Visual Oriented Cell Options

Overview

This document covers several custom cells for adding visual and graphical cells to your templates. The options include:

  • boolean graphic,
  • divider,
  • image,
  • percentage graphic,
  • graphical shapes,
  • Unicode symbol,
  • smiley faces and
  • start ratings.

   Boolean Graphic

The cell formula result is the boolean indicating which image state to display (true for 'checked' or false for 'unchecked'). A null result displays nothing. To ensure a boolean use and(expression).

A large variety of display options are available. Below are examples of its results from the “example/Custom cells/Visual Oriented Custom Cells - misc” template.

  

The unique custom cell properties are shown below.

  

The image options are shown below.

  

The display options are shown below.

  

Choose the presentation option combination that best fits your needs.

   Divider

The cell formula result is the height of the divider.

The unique custom cell properties are shown below.

  

The height on line” value is the allocated height which may differ from the drawn height. The style options are shown below.

  

The color options are shown below.

  

Below are examples of its results from the “example/Custom cells/Visual Oriented Custom Cells - misc” template.

  

   Image

The cell formula result is an image URL or the base64 image representation.

See the specific tutorial on “Adding Images” for more information on this custom cell.

   Percentage Graphic

The cell formula result may be:"next" or "previous" indicating the input cell containing the percentage, or the percentage itself.

The unique custom cell properties are shown below.

  

The shape options are shown below.

  

Formulas can be used for the various color options. Left clicking on the label (i.e. “Bar color”) presents a menu of color options as shown below. Choosing one sets the formula text accordingly.

  

Shown below are a label cell and a custom cell in the design mode.

  

Consider a cell with the formula

= @current / 8

The output from these 2 cells is shown below with values of 1, 3, 6, and 8.

  

   Graphic

The cell formula result is the name or code of the graphic to show. There are options for foreground color, background color and shapes.

The unique custom cell properties are shown below.

  

The name options are shown below.

  

Below are examples of its results from the “example/Custom cells/Graphic Shapes” template.

  

Formulas can be used for the graphic colors. Below is one for the fill color.

= compareValue(43, 4, "#00FF00", "#FFFFFF", "#FF0000")

The signature for the compareValue() function which compares 2 values and returns one of the 3 possible values.

result = compareValue(value1, value2, lessThanResult, equalResult, greaterThanResult)

This technique can also be used for regular cell background or foreground colors. For example,

compareValue(@cellValue, 200, 'lightRed', null, ' paleGreen')

   Unicode Symbol

The cell formula result is the numeric Unicode value. See the mapping tables at https://jrgraphix.net/r/Unicode.

Below are examples of its results from the “example/Custom cells/Unicode symbols” template.

  

The unique custom cell properties are shown below.

  

The codes listed at the web site above use hexadecimal notation. The custom cell requires a numeric value. Below is a formula to easily convert between hexadecimal and decimal values.

=convert('hex', 'number', '03a0')

Shown below are a label cell and a custom cell in the design mode.

  

The output from these 2 cells is shown below.

  

   Smiley

The cell formula result indicates which smiley to show. A non-numeric shows nothing. A negative is sad, zero is neutral, and positive is happy.

The unique custom cell properties are shown below.

  

Below are examples of its results from the “example/Custom cells/Smiley options” template.

  

   Star Rating

The cell formula result is a rating from 0 up to either 5 or 10 for the number of stars to show.

The unique custom cell properties are shown below.

  

Below are examples of its results from the “example/Custom cells/Star rating options” template.